// 合同管理页面样式
.contract-container {
  width: 100%;
  min-height: 100vh;
  background: #F8F8F8;
  overflow-x: hidden;
}

// 标签页样式
.contract-tabs {
  background: #FFFFFF;
  
  :deep(.van-tabs__wrap) {
    background: #FFFFFF;
    border-bottom: 1px solid #F0F0F0;
  }
  
  :deep(.van-tab) {
    font-size: 28px;
    font-weight: 500;
    color: #666666;
  }
  
  :deep(.van-tab--active) {
    color: #3F99F9;
    font-weight: 600;
  }
  
  :deep(.van-tabs__line) {
    background: #3F99F9;
    height: 4px;
    border-radius: 2px;
  }
  
  :deep(.van-tab__text) {
    padding: 20px 0;
  }
}

// 标签页内容区域
.tab-content {
  background: #F2F2F6;
  min-height: calc(100vh - 100px);
}

// 顶部导航区域背景
.header-wrapper {
  width: 750px;
  // height: 200px;
  background: #3F99F9;
  border-radius: 0px 0px 0px 0px;
  position: relative;
  margin: 0 auto;
}

// 顶部导航
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 44px 40px 20px 20px;
  background: transparent;
  position: relative;

  .back-icon {
    width: 60px;
    height: 60px;
    font-size: 60px;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 324px;
    height: 54px;
    font-family: 'Source Han Sans CN', 'Source Han Sans CN';
    font-weight: 500;
    font-size: 32px;
    color: #FFFFFF;
    text-align: center;
    font-style: normal;
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

// 搜索框
.search-container {
  // margin: 20px 16px;
  margin-top: 22px;
  margin-left: 26px;
  width: 670px;
  height: 70px;
  background: #FFFFFF;
  border-radius: 10px 10px 10px 10px;
  display: flex;
  align-items: center;

  :deep(.van-search) {
    padding: 0;
    background: transparent;
    width: 100%;
    // height: 100%;

    .van-search__content {
      background: rgba(45,103,176,0.06);
      border: none;
      border-radius: 10px;
      height: 100%;
      display: flex;
      align-items: center;
      padding: 16px 0 10px 36px;

      .van-cell--borderless {
        height: auto;
      }

      .van-search__field {
        height: auto;
      }

      .van-field__control {
        font-family: 'Source Han Sans CN', 'Source Han Sans CN';
        font-weight: 500;
        font-size: 28px;
        color: #333;
        text-align: left;
        font-style: normal;
        text-transform: none;
        line-height: 1.2;
        background: transparent;
      }

      .van-field__control::placeholder {
        color: #999;
        font-size: 28px;
      }
    }

    .van-search__action {
      padding: 0 20px 0 10px;
      color: #3F99F9;
      font-size: 28px;
      font-weight: 500;
    }
  }
  
  // 搜索建议样式
  .search-suggestions {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    overflow: hidden;
    
    .suggestion-item {
      display: flex;
      align-items: center;
      padding: 12px 16px;
      border-bottom: 1px solid #f5f5f5;
      cursor: pointer;
      
      &:last-child {
        border-bottom: none;
      }
      
      &:hover {
        background: #f5f5f5;
      }
      
      .van-icon {
        margin-right: 8px;
      }
      
      span {
        color: #323233;
        font-size: 14px;
      }
    }
  }
}

// 筛选区域
.filter-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: transparent;
  
  &::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -16px;
    height: 16px;
    background: #F2F2F6;
  }
  
  position: relative;
  margin-bottom: 16px;
  margin-top: 16px;

  .filter-buttons {
    display: flex;
    gap: 20px;

    .filter-item {
      display: flex;
      align-items: center;
      padding: 12px 20px;
      background: #FFFFFF;
      border-radius: 20px;
      font-size: 26px;
      color: #333333;
      cursor: pointer;
      box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.1);

      &:active {
        transform: scale(0.95);
      }

      span {
        margin-right: 8px;
        font-weight: 400;
      }

      .filter-arrow {
        font-size: 20px;
        color: #999;
        transition: transform 0.3s ease;
      }

      &.active {
        background: #3F99F9;
        color: #FFFFFF;

        .filter-arrow {
          color: #FFFFFF;
          transform: rotate(180deg);
        }
      }
    }
  }

  .add-button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    width: 123px;
    height: 60px;
    background: #3F99F9;
    border-radius: 10px 10px 10px 10px;
    font-family: Source Han Sans CN, Source Han Sans CN;
    font-weight: 400;
    font-size: 24px;
    color: #FFFFFF;
    text-align: center;
    font-style: normal;
    text-transform: none;
    .van-icon {
      margin-right: 8px;
      font-size: 24px;
    }
  }
}

// 合同列表
.contract-list {
  padding: 0 20px 40px 20px;

  .contract-item {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    &:active {
      transform: scale(0.98);
    }

    &:last-child {
      margin-bottom: 0;
    }

    .contract-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 24px;

      .contract-title {
        flex: 1;
        font-family: 'Source Han Sans CN', 'Source Han Sans CN';
        font-weight: 600;
        font-size: 32px;
        color: #333333;
        line-height: 1.3;
        margin-right: 20px;
      }

      .contract-status {
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 22px;
        font-weight: 500;
        white-space: nowrap;

        &.status-draft {
          background: #F5F5F5;
          color: #999999;
        }

        &.status-pending {
          background: #FFF7E6;
          color: #FA8C16;
        }

        &.status-approved {
          background: #F6FFED;
          color: #52C41A;
        }

        &.status-rejected {
          background: #FFF2F0;
          color: #FF4D4F;
        }

        &.status-executed {
          background: #E6F7FF;
          color: #1890FF;
        }
      }
    }

    .contract-info {
      margin-bottom: 24px;

      .info-row {
        display: flex;
        align-items: center;
        margin-bottom: 16px;
        font-size: 26px;

        &:last-child {
          margin-bottom: 0;
        }

        .label {
          width: 140px;
          color: #666666;
          font-weight: 400;
          flex-shrink: 0;
        }

        .value {
          flex: 1;
          color: #333333;
          font-weight: 500;
          word-break: break-all;

          &.amount {
            color: #3F99F9;
            font-weight: 600;
          }
        }
      }
    }

    .contract-actions {
      display: flex;
      gap: 16px;
      justify-content: flex-end;

      .action-btn {
        min-width: 120px;
        height: 60px;
        border-radius: 10px 10px 10px 10px;
        font-size: 24px;
        // font-weight: 500;
        border: 2px solid #E5E5E5;
        background: #FFFFFF;
        color: #666666;

        &.van-button--primary {
          background: #2D67B0;
          border-color: #2D67B0;
          color: #FFFFFF;
        }

        // &:active {
        //   transform: scale(0.95);
        // }
      }
    }
  }
}

// 空状态
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 40px;
  text-align: center;

  .empty-icon {
    margin-bottom: 40px;

    img {
      width: 200px;
      height: 200px;
      opacity: 0.6;
    }
  }

  .empty-text {
    font-size: 28px;
    color: #999999;
    margin-bottom: 40px;
    font-weight: 400;
  }

  .empty-action {
    min-width: 200px;
    height: 80px;
    border-radius: 40px;
    font-size: 28px;
    font-weight: 500;
    background: #2D67B0;
    border-color: #2D67B0;
  }
}

// ActionSheet 样式覆盖
:deep(.van-action-sheet) {
  .van-action-sheet__header {
    font-size: 32px;
    font-weight: 600;
    color: #333333;
    padding: 30px 0;
  }

  .van-action-sheet__item {
    font-size: 28px;
    color: #333333;
    padding: 24px 0;
    &:active {
      background-color: #F5F5F5;
    }
  }

  .van-action-sheet__cancel {
    font-size: 28px;
    color: #666666;
    padding: 24px 0;
    margin-top: 16px;
  }
}

